import React,{Component} from 'react';
import img_url from '../slideBanner/mobUrl';
import 'swiper/dist/css/swiper.min.css';
import  Swiper from 'swiper';
class MobileCarouse extends Component{
    componentDidMount(){
        var mySwiper = new Swiper ('.swiper-container', {
            loop:true,
            // 如果需要分页器
            pagination: '.swiper-pagination',
            autoplay : 3000,
            autoplayDisableOnInteraction : false,
        })
    };
    render(){
        let swiperSlide = img_url.map((value,index) => {
           return(
               <div className="swiper-slide" style={{width:'100%',overflow:'hidden'}} key={index}>
                   <img src={value.img} alt=""  style={{width:"100%",height:'auto'}}/>
               </div>
           )
        });
        return(
            <div className='swiper-container' style={{marginBottom:'20px'}}>
                <div className="swiper-wrapper">
                    {swiperSlide}
                </div>
                <div className="swiper-pagination" style={{marginBottom:'-10px'}}></div>
            </div>
        )
    }
};
export default MobileCarouse;